//------------<VCQVIET@GMAIL.COM>------------------
(function($){
	$.fn.scrollend = function(options) {	
		options=$.extend({
			over: 10,
			callback: function(){}
		  },options);
		$(this).each(function(){
			$(this).unbind('scroll').scroll(function(){
				var $ob = $(this);
				if($ob.scrollTop() + $ob.innerHeight()>=$ob[0].scrollHeight - options.over){
					if(options.callback){
						options.callback($(this));
					}
				}
			});
		});
	};

}(jQuery));